from selenium.webdriver.common.by import By

from common.base import Base
from common.functions import open_browser


class LoginPage(Base):
    def bk_username(self,username):
        self.send_keys((By.NAME,'username'),username)

    def bk_password(self,password):
        self.send_keys((By.NAME,'password'),password)

    def login_bnt(self):
        self.click((By.CLASS_NAME,'btn-a'))


if __name__ == '__main__':
    driver=open_browser()
    lp =LoginPage(driver)
    lp.get('http://139.129.26.163/admin/privilege.php?act=login')
    lp.bk_username('admin')
    lp.bk_password('admin123')
    lp.login_bnt()







